package com.hehao.config;

import com.hehao.filters.MyFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: Damon
 * @createTime: 2024/09/12 14:03
 * @description: filterconfig
 */
@Configuration
public class FilterConfig {
    @Bean
    public FilterRegistrationBean<MyFilter> TobAuthFilterRegistration() {
        FilterRegistrationBean<MyFilter> registration = new FilterRegistrationBean<>();
        registration.setFilter(new MyFilter());
        registration.addUrlPatterns("/**");
        registration.setOrder(1);
        return registration;
    }
}
